<template>
	<view>
		<view class="head">
			<view class="step">
				预约<br>服务
			</view>
			<view class="interval">
				----------
			</view>
			<view class="step">
				支付<br>订单
			</view>
			<view class="interval">
				----------
			</view>
			<view class="step">
				门店<br>服务
			</view>
		</view>

		<view class="info">
			<view class="shop">
				<uni-icons type="shop-filled" size="30" color="#0084FF"></uni-icons>
				<view class="address">
					<view>伟业汽车美容店路店</view>
					<view>山阳区人民中路32号</view>
				</view>
			</view>
			<view class="user">
				<uni-icons type="person-filled" size="30" color="#0084FF"></uni-icons>
				<view>
					张三
				</view>
				<view>
					18895039309
				</view>
			</view>

			<view class="car">
				<view>
					<img src="/static/car.png" alt="" />
					<view class="model">
						奔驰FWE4/豫A98FHJ
					</view>
				</view>
				<uni-icons type="right" size="30" @click="chooseCar"></uni-icons>
			</view>

			<view class="title">
				<view>服务产品</view>
				<view>共选择1项服务产品</view>
			</view>

			<view class="serviceList">
				<view class="serviceItem">
					<view>精洗汽车</view>
					<view>￥199元</view>
				</view>
				<view class="serviceItem">
					<view>精洗汽车</view>
					<view>￥199元</view>
				</view>
			</view>

			<view class="coupon">
				<view>
					<img src="/static/coupon.png" alt="" />
					<view class="model">
						代金券/优惠券
					</view>L
				</view>
				<view class="right">
					<view>
						-10元
					</view>
					<uni-icons type="right" size="30" @click="chooseCoupon"></uni-icons>
				</view>

			</view>

		</view>
		<view class="bottom">
			<view class="left">
				<img src="/static/kefu.png" alt=""  @click="toggle('bottom')"/>
				<view class="">
					联系客服
				</view>
			</view>
			<view class="totalPrice">
				<text>合计：</text>
				<text>￥29.80</text>
			</view>
			<view class="btn" @click="submit">
				提交订单
			</view>
		</view>

		<!-- 普通弹窗 -->
		<uni-popup ref="popup" background-color="#fff">
			<view class="popup-content" >
				<view>1234545545</view>
				<view>呼叫</view>
				<!-- <view>取消</view> -->
				</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 'center',
			}
		},
		methods: {
			chooseCar() {
				uni.navigateTo({
					url: '/pages/index/carWash/chooseCar/chooseCar'
				})
			},
			chooseCoupon() {
				uni.navigateTo({
					url: '/pages/index/carWash/chooseCoupon/chooseCoupon'
				})
			},
			toggle(type) {
				this.type = type
				// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
				this.$refs.popup.open(type)
			},
			submit(){
				// 先支付支付完再跳转
				uni.navigateTo({
					url:"/pages/index/maintenanceDetail/paymentResults/paymentResults"
					})
			}
		}
	}
</script>

<style>
	page {
		background-color: #fff;
	}

	.head {
		display: flex;
		justify-content: space-evenly;
		margin-top: 20px;
	}

	.step {
		/* background-color: aqua; */
		width: 44px;
		height: 44px;
		font-size: 12px;
		border-radius: 22px;
		text-align: center;
		border: 1px solid #BBBBBB;
	}

	.interval {
		line-height: 44px;
		margin-left: -50px;
		margin-right: -50px;
	}

	.info {
		padding-left: 20px;
		padding-right: 20px;
	}

	.shop,
	.user,
	.car,
	.coupon {
		display: flex;
		margin-top: 20px;
		border-bottom: 2px solid #BBBBBB;
	}

	.shop>.uni-icons {
		margin-top: 10px;
		margin-right: 13px;
	}

	.address>view:nth-child(1) {
		font-size: 14px;
	}

	.address>view:nth-child(2) {
		font-size: 12px;
	}

	.user {
		justify-content: space-between;
		height: 30px;
	}

	.user>view:nth-child(2) {
		margin-left: -160px;
	}

	.car {
		height: 30px;
		line-height: 30px;
		justify-content: space-between;
	}

	.car>view:nth-child(1) {
		display: flex;
	}

	.car>view>img {
		width: 33px;
		height: 30px;
		margin-right: 12px;
	}

	.title {
		display: flex;
		justify-content: space-between;
		margin-top: 20px;
		height: 30px;
	}

	.title>view:nth-child(1) {
		font-weight: bold;
	}

	.serviceItem {
		height: 25px;
		font-size: 12px;
		display: flex;
		justify-content: space-between;
	}

	.serviceList {
		padding-left: 10px;
		padding-right: 10px;
		padding-bottom: 10px;
		border-bottom: 2px solid #BBBBBB;
	}

	.coupon {
		height: 30px;
		line-height: 30px;
		justify-content: space-between;
	}

	.coupon>view:nth-child(1) {
		display: flex;
	}

	.coupon>view>img {
		width: 33px;
		height: 30px;
		margin-right: 12px;
	}

	.right {
		display: flex;
	}

	.bottom {
		position: fixed;
		bottom: 0;
		display: flex;
		width: 100%;
		height: 50px;
		justify-content: space-between;
	}

	.left {
		text-align: center;
		margin-left: 7px;
	}

	.left>img {
		height: 24px;
		width: 24px;
	}

	.btn {
		width: 110px;
		height: 50px;
		line-height: 50px;
		font-size: 16px;
		text-align: center;
		background-color: #F44444;
		color: #fff;
	}

	.totalPrice {
		line-height: 50px;
		margin-left: 90px;
	}

	.totalPrice>text:nth-child(1) {
		font-weight: bold;
		font-size: 14px;

	}

	.totalPrice>text:nth-child(2) {
		color: #F44444;
	}
	
	.popup-content{
		text-align: center;
	}
	.popup-content >view{
		height: 50px;
		line-height: 50px;
	}
</style>
